package com.linkme2night.controller;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import com.linkme2night.model.SocialNetwork_enum;
import com.linkme2night.view.login.MenuActivity;
import com.linkme2night.view.openvenuesmap.OpenVenuesMapActivity;
import com.linkme2night.view.search.SearchActivity;

public class FrontController {

	
	public static void openInteractWithVenue(Context context, int venueID,
			int clubberID) {
		InteractWithVenueController iwvController = new InteractWithVenueController();
		iwvController.openInteractwithVenue(context, venueID, clubberID);
	}
		
	public void openMenu(Activity activity, SocialNetwork_enum socialNet) {


		if (socialNet.equals(SocialNetwork_enum.FACEBOOK)) {
			Intent intent = new Intent();
			intent.setClass(activity.getApplicationContext(), MenuActivity.class);
			intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
			activity.getApplicationContext().startActivity(intent);
			activity.finish();

		} else if (socialNet.equals(SocialNetwork_enum.GMAIL)){
			Intent intent = new Intent();
			intent.setClass(activity.getApplicationContext(), MenuActivity.class);
			activity.startActivity(intent);
		}

	}

	public void openViewVenueOnMap(Context context, int venueID, int clubberID) {
		// TODO this method opens the activity view venue on map.
		//This method should be implemented by who is going to develop such activity.
		
	}

	public void openSearch(Context context) {
		Intent intent = new Intent();
		intent.setClass(context, SearchActivity.class);
		intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		context.startActivity(intent);
	}
	
	public void openExplore(Context context)
	{
		Intent intent = new Intent();
		intent.setClass(context, OpenVenuesMapActivity.class);
		intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		context.startActivity(intent);
	}

}
